
import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'
const router = createRouter({
  history: createWebHashHistory(),
  // history: createWebHistory(),
  routes: [
    {
      path: '/',
      redirect: '/manage'
    },
    {
      path: '/manage',
      name:'manage',
      component: () => import('../../src/views/manage/Manage.vue'),
      children: [
        {path:'/mapview',
          component: () => import('../views/navLeft/MapView.vue')
        },
        {path:'/overview',
          component: () => import('../views/navLeft/Overview.vue')
        },
        {path:'/repair',
          component: () => import('../views/navLeft/Repair.vue'),
          children:[
            {path:'/userDetail',
              component: () => import('../views/details/UserDetails.vue'),
            }
          ]
        },
        {path:'/admin',
          component: () => import('../views/navLeft/Admin.vue')
        },
        {path:'/statistics',
          component: () => import('../views/navLeft/Statistics.vue')
        },
        {path:'/instructions',
          component: () => import('../views/navLeft/Instructions.vue'),
          children:[
            {path:'/explanation',
              component: () => import('../views/details/Explanation.vue'),
            }
          ]
        } 
      ]
    },
    {path:'/manageLogin',
      name:'manageLogin',
      component: () => import('../views/manage/Managelogin.vue')
    },
  ]
})

export default router